package com.lc.projects.sample.plan;

import java.awt.image.BufferedImage;
import java.awt.image.RenderedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.imageio.stream.FileImageOutputStream;
import javax.imageio.stream.ImageOutputStream;

public class TestImage {
	public static void main(String[] args) throws IOException {
		File file = new File("d:\\test.jpg");
		BufferedImage bi = ImageIO.read(file);
		
		ImageOutputStream out = new FileImageOutputStream(new File("d:\\test2.jpg"));
		ImageIO.write((RenderedImage)bi, "jpg", out);
		
	}
}
